package routers

import (
	"go-gin-init/app/api/userAPI"
	"go-gin-init/app/middleware"
)

func (r *RouterGroup) UserRouter() {
	userRouter := r.Group("user")
	userRouter.POST("login", userAPI.UserLogin)
	userRouter.POST("register", userAPI.UserRegister)

	userRouter.Use(middleware.JWTAuth())

	// 需要jwt验证
	userRouter.POST("update", userAPI.UserUpdate)
	userRouter.DELETE("del/:id", userAPI.UserDelete)
	userRouter.GET("getCurrent/:id", userAPI.CurrentUser)

}
